# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: 8.7 调用父类方法.py
@time: 2021/02/13
"""


class Person:
    ...
    age = 21
    def __init__(self, name):
        self.name = name


class Person01:
    ...
    def __init__(self, name):
        self.name = name

class Student(Person):
    ...

    def __init__(self, name, score):
        # Student.__bases__
        # print(Student.__base__)
        super(Student, self).__init__(name)
        self.score = score
        print('111')
        print(super(Student, Student))

    def __repr__(self):
        return f'name:{self.name}, score:{self.score}'


class A:
    def spam(self):
        print(f'A spam')
        super().spam()

class B:
    def spam(self):
        print(f'B spam')

class C(A,B):
    ...


if __name__ == '__main__':
    pass
    print(Student.__mro__)
    student = Student('tony', 21)
    # print(student)
    # c = C()
    # c.spam()
    print(C.__mro__)